# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pv
pkgver=1.9.0
pkgrel=0
pkgdesc="CLI tool for monitoring the progress of data through a pipeline"
url="https://www.ivarch.com/programs/pv.shtml"
arch="all"
license="Artistic-2.0"
subpackages="$pkgname-doc"
source="https://www.ivarch.com/programs/sources/pv-$pkgver.tar.gz"

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-nls
	make
}

check() {
	# IPC tests fail when running in parallel
	make -j1 check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
1085387fdf645ab14b4b83b006dbc09018e2e3cb89a585cc6b9d5c03e947ffd84d300fb0698bb8e4dfc918aa25f9453897a394791a6aa9caefa278e21b9acf35  pv-1.9.0.tar.gz
"
